﻿using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart
{
    [XmlRoot("legendEntry", Namespace = Constants.Chart)]
    public class LegendEntry : XmlSerializable
    {
        [XmlElement("idx", Namespace = Constants.Chart)]
        public NullableValue<uint> Index { get; set; }

        [XmlElement("", Namespace = Constants.Chart)]
        public ILegendEntry LegendEntries { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Chart)]
        public ExtensionList ExtensionList { get; set; }

        public LegendEntry() { }
    }

    [XmlRoot("delete", Namespace = Constants.Chart)]
    public class Delete : XmlSerializable, ILegendEntry
    {
        [Optional]
        [XmlAttribute("val", Form = XmlSchemaForm.Qualified)]
        public bool Value { get; set; }

        public Delete() { }
    }
}
